<html>
<head><meta charset="utf-8"><title>Use github api · t-compiler/cargo-bisect-rustc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/index.html">t-compiler/cargo-bisect-rustc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html">Use github api</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="189139632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189139632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189139632">(Feb 26 2020 at 18:00)</a>:</h4>
<p>I have a prototype branch of cargo-bisect-rustc that uses Github API directly. It is pretty cool.</p>



<a name="189139975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189139975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189139975">(Feb 26 2020 at 18:03)</a>:</h4>
<p>I originally tried to build it atop the <code>hubcaps</code> crate, but I eventually gave up on that (due to the current release of hubcaps not having support for requesting lists of commits) and made an ad-hoc solution atop <code>reqwest</code>. Luckily we really don't need to use a very large API surface at all.</p>



<a name="189144311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189144311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189144311">(Feb 26 2020 at 18:40)</a>:</h4>
<p>Excellent!  I was just taking a look at the GitHub API last night to do the same thing.  It looks like much of the git module can go away, including the clone of the rust repository.  This will be a big improvement.</p>



<a name="189144460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189144460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189144460">(Feb 26 2020 at 18:41)</a>:</h4>
<p>I submitted a PR last night that updates <code>reqwest</code> to the current release.  The GET request API changed in recent releases.  Async is default now so imports will change to the <code>blocking</code> library.</p>



<a name="189146187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189146187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189146187">(Feb 26 2020 at 18:56)</a>:</h4>
<p>This part of the API: <a href="https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit" target="_blank" title="https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit">https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit</a></p>
<p>looks like it might also support automation of the regression commit SHA -&gt; PR in the final report</p>



<a name="189146672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189146672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189146672">(Feb 26 2020 at 19:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> If you don't mind pushing a branch, I'd be interested to see how you are approaching it</p>



<a name="189155365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189155365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189155365">(Feb 26 2020 at 20:27)</a>:</h4>
<p><span class="user-mention" data-user-id="262810">@Chris Simpkins</span> :  <a href="https://github.com/pnkfelix/cargo-bisect-rustc/tree/use-github-api" target="_blank" title="https://github.com/pnkfelix/cargo-bisect-rustc/tree/use-github-api">https://github.com/pnkfelix/cargo-bisect-rustc/tree/use-github-api</a></p>



<a name="189155441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189155441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189155441">(Feb 26 2020 at 20:28)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116083">pnkfelix</span> <a href="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189155365" title="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189155365">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="262810">Chris Simpkins</span> :  <a href="https://github.com/pnkfelix/cargo-bisect-rustc/tree/use-github-api" target="_blank" title="https://github.com/pnkfelix/cargo-bisect-rustc/tree/use-github-api">https://github.com/pnkfelix/cargo-bisect-rustc/tree/use-github-api</a></p>
</blockquote>
<p>Tyvm!  I will take a look tonight.</p>



<a name="189155443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189155443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189155443">(Feb 26 2020 at 20:28)</a>:</h4>
<p>I'm going to do a bunch of cleanup of that commit series before I make any PR for it</p>



<a name="189155458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189155458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189155458">(Feb 26 2020 at 20:28)</a>:</h4>
<p>but you can at least see what I settled on in my final approach</p>



<a name="189207608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189207608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189207608">(Feb 27 2020 at 12:06)</a>:</h4>
<p><span class="user-mention silent" data-user-id="262810">Chris Simpkins</span> <a href="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189146187" title="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189146187">said</a>:</p>
<blockquote>
<p>This part of the API: <a href="https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit" target="_blank" title="https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit">https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit</a></p>
<p>looks like it might also support automation of the regression commit SHA -&gt; PR in the final report</p>
</blockquote>
<p>interesting. In practice I don't think we need this, because we only bisect down to the bors commits, which have the PR's in their commit message. (I.e. that mapping isn't happening, I think, in cargo-bisect-rustc; its just an artifact of how bors formats its merge commit messages.)</p>



<a name="189208776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189208776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189208776">(Feb 27 2020 at 12:26)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> one thing about using github API -- it might make sense for us to stand up a proxy or something to it that authenticates the specific requests we need. the rate limits without a token are pretty painful...</p>



<a name="189208802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189208802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189208802">(Feb 27 2020 at 12:27)</a>:</h4>
<p>e.g. we can add an endpoint to triagebot that'll return exactly what bisect needs, but without requiring auth on the bisect end</p>



<a name="189208830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189208830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189208830">(Feb 27 2020 at 12:27)</a>:</h4>
<p>couldn't that be used to dos triagebot?</p>



<a name="189208838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189208838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189208838">(Feb 27 2020 at 12:27)</a>:</h4>
<p>eh, I figured if one hits the rate limit the code in bisect could just fall back on the old strategy?</p>



<a name="189208849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189208849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189208849">(Feb 27 2020 at 12:27)</a>:</h4>
<p>hm, how many requests do we make?</p>



<a name="189208854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189208854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189208854">(Feb 27 2020 at 12:27)</a>:</h4>
<p>the unauthenticated rate limit is basically unusable, 60 req/hour from an ip</p>



<a name="189208857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189208857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189208857">(Feb 27 2020 at 12:27)</a>:</h4>
<p>(I haven't <em>implemented</em> that strategy yet, but it was my plan)</p>



<a name="189208919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189208919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189208919">(Feb 27 2020 at 12:28)</a>:</h4>
<p>((by "old strategy", I mean making a local checkout of the repo.))</p>



<a name="189208924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189208924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189208924">(Feb 27 2020 at 12:28)</a>:</h4>
<p>so if you're under a corp nat or on ci it's practically 0 req/forever</p>



<a name="189208949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189208949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189208949">(Feb 27 2020 at 12:28)</a>:</h4>
<p>triagebot will likely soon have access to 12,500 requests/hour, roughly, and presumably we can even go further than that (i.e., cache the results -- we don't have that many PRs)</p>



<a name="189209112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209112">(Feb 27 2020 at 12:30)</a>:</h4>
<p>I would be very hesitant on relying on the non-authenticated API though to be clear, even if we have fallback</p>



<a name="189209119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209119">(Feb 27 2020 at 12:30)</a>:</h4>
<p>I'd guess we'd hit that fallback a ton and it's pretty expensive fallback</p>



<a name="189209160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209160">(Feb 27 2020 at 12:31)</a>:</h4>
<p>hmm, what we could do is store a plaintext mapping of commit =&gt; pr somewhere</p>



<a name="189209217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209217">(Feb 27 2020 at 12:32)</a>:</h4>
<p>well sure that's basically the same as triagebot caching it in the db, imo</p>



<a name="189209231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209231">(Feb 27 2020 at 12:32)</a>:</h4>
<p>(well, worse, to be honest)</p>



<a name="189209265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209265">(Feb 27 2020 at 12:33)</a>:</h4>
<p>isn't that out of scope for triagebot though?</p>



<a name="189209307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209307">(Feb 27 2020 at 12:33)</a>:</h4>
<p>it seems to be like it's drifting to be more of the "everything the team needs bot"</p>



<a name="189209309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209309">(Feb 27 2020 at 12:33)</a>:</h4>
<p>I consider triagebot our single solution to triage (including things like this). But of course we can stand up a separate service too...</p>



<a name="189209360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209360">(Feb 27 2020 at 12:34)</a>:</h4>
<p>which is not... bad, and I sort of like that, but we would need to at least rename it :)</p>



<a name="189209377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209377">(Feb 27 2020 at 12:34)</a>:</h4>
<p>well, I mean, at github it's "rustbot" already :)</p>



<a name="189209397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189209397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189209397">(Feb 27 2020 at 12:34)</a>:</h4>
<p>it'll probably be a github app soon which'll also mean it's in the bot namespace of usernames</p>



<a name="189237978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189237978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189237978">(Feb 27 2020 at 17:58)</a>:</h4>
<p>Thoughts about implementing <span class="user-mention" data-user-id="116083">@pnkfelix</span> approach until the triagebot support is implemented?  Even with the GH API rate limit issue, this will be a significant improvement for those of us who are using the tool for one off bisect diagnostics on ICE reports.  These are low volume API hits and would stay well within the 60/hr range in my case/IP.  And the only "downside" for users who hit the rate limit is that they fall back to the current approach to bare clone the Rust git repository that is the current default in the tool</p>



<a name="189252166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189252166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189252166">(Feb 27 2020 at 20:14)</a>:</h4>
<p>I think it's fine to merge it in, but I'd want to contemplate it in a release at least a bit</p>



<a name="189252189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189252189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189252189">(Feb 27 2020 at 20:15)</a>:</h4>
<p>(maybe gather some feedback from internal dogfooding)</p>



<a name="189253325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189253325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189253325">(Feb 27 2020 at 20:28)</a>:</h4>
<p>My current implementation puts github support up under a command line flag that you use to choose which strategy you want to use. (And there's no fallback from github to local git yet). Would people prefer the local git checkout strategy to remain the default?</p>



<a name="189253481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189253481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189253481">(Feb 27 2020 at 20:29)</a>:</h4>
<p>I think we should have the github be the default and no auto fallback, personally</p>



<a name="189253571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189253571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189253571">(Feb 27 2020 at 20:30)</a>:</h4>
<p>(we should tell people: "you ran up against rate limits, please pass <code>--clone-repo</code> or wait until $DATE"</p>



<a name="189253876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189253876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189253876">(Feb 27 2020 at 20:33)</a>:</h4>
<blockquote>
<p>I think we should have the github be the default and no auto fallback, personally</p>
</blockquote>
<p>Is it worth considering GH API authentication support in that case?</p>



<a name="189253987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189253987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189253987">(Feb 27 2020 at 20:34)</a>:</h4>
<p>I wouldn't, I think</p>



<a name="189253997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189253997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189253997">(Feb 27 2020 at 20:34)</a>:</h4>
<p>I guess we <em>could</em> in theory</p>



<a name="189254018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189254018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189254018">(Feb 27 2020 at 20:34)</a>:</h4>
<p>but it's a bit not great to have that in e.g. an environment variable (for security reasons)</p>



<a name="189256626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256626">(Feb 27 2020 at 21:03)</a>:</h4>
<p>oh, is it not standard practice to access the GITHUB_TOKEN via an env var?</p>



<a name="189256686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256686">(Feb 27 2020 at 21:03)</a>:</h4>
<p>I have a command that pulls it out of my password manager when needed</p>



<a name="189256707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256707">(Feb 27 2020 at 21:03)</a>:</h4>
<p>to avoid every single thing you run on your computer to have access to it</p>



<a name="189256755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256755">(Feb 27 2020 at 21:04)</a>:</h4>
<p>I see. I guess I'm too trusting.</p>



<a name="189256781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256781">(Feb 27 2020 at 21:04)</a>:</h4>
<p><span class="user-mention" data-user-id="121055">@Pietro Albini</span> what is the interface for your thing like, from the viewpoint of an app that wants access to the github token?</p>



<a name="189256798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256798">(Feb 27 2020 at 21:04)</a>:</h4>
<p>does it take it on the command line, or via stdin, or ... ?</p>



<a name="189256803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256803">(Feb 27 2020 at 21:04)</a>:</h4>
<p>still the env var</p>



<a name="189256819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256819">(Feb 27 2020 at 21:05)</a>:</h4>
<p>I basically do <code>eval $(pass vars/github-token)</code></p>



<a name="189256833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256833">(Feb 27 2020 at 21:05)</a>:</h4>
<p>oh. So you just decide whether or not to <em>set</em> the env var on the case by case basis</p>



<a name="189256837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256837">(Feb 27 2020 at 21:05)</a>:</h4>
<p>(with a nicer alias on top of that)</p>



<a name="189256870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256870">(Feb 27 2020 at 21:05)</a>:</h4>
<p>So it probably <em>is</em> okay for me to set this up so that it queries the GITHUB_TOKEN env var?</p>



<a name="189256897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256897">(Feb 27 2020 at 21:05)</a>:</h4>
<p>yep, on most of the shells it's not set, and when I need it I have to explicitly want that and press the physical button on the yubikey</p>



<a name="189256902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256902">(Feb 27 2020 at 21:06)</a>:</h4>
<p>(the other option I was considering was to make that env var access condtional on the user passing in some command line flag.)</p>



<a name="189256969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189256969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189256969">(Feb 27 2020 at 21:06)</a>:</h4>
<p>well if the env var is there I don't see why not use it</p>



<a name="189257035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189257035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189257035">(Feb 27 2020 at 21:07)</a>:</h4>
<p>my interpretation of mark's comment is that people shouldn't just stick it in their bashrc</p>



<a name="189257050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189257050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189257050">(Feb 27 2020 at 21:07)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189253481" title="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189253481">said</a>:</p>
<blockquote>
<p>I think we should have the github be the default and no auto fallback, personally</p>
</blockquote>
<p>Well maybe for the initial landing I'd make github be opt-in, with the intention of switching the default after everyone's had a chance to stress it a little...</p>



<a name="189257064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189257064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189257064">(Feb 27 2020 at 21:07)</a>:</h4>
<p><span class="user-mention silent" data-user-id="121055">Pietro Albini</span> <a href="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189257035" title="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189257035">said</a>:</p>
<blockquote>
<p>my interpretation of mark's comment is that people shouldn't just stick it in their bashrc</p>
</blockquote>
<p>okay now I see. I think.</p>



<a name="189257174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189257174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189257174">(Feb 27 2020 at 21:08)</a>:</h4>
<p>boy and here I was thinking I was a good citizen for making sure it (my setting of the env var) wasn't part of the dotfiles that I have under version control in a public server.</p>



<a name="189258022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189258022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189258022">(Feb 27 2020 at 21:16)</a>:</h4>
<p>heh :)</p>



<a name="189258051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189258051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189258051">(Feb 27 2020 at 21:16)</a>:</h4>
<p>yeah I basically don't want to encourage a bashrc type configuration of it</p>



<a name="189258102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189258102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189258102">(Feb 27 2020 at 21:16)</a>:</h4>
<p>but reading it opportunistically seems good</p>



<a name="189258135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189258135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189258135">(Feb 27 2020 at 21:17)</a>:</h4>
<p>maybe warning if it's not set and in github api mode?</p>



<a name="189389980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189389980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189389980">(Feb 29 2020 at 13:09)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> </p>
<p><span class="user-mention silent" data-user-id="116083">pnkfelix</span> <a href="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189207608" title="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189207608">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="262810">Chris Simpkins</span> <a href="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189146187" title="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Use.20github.20api/near/189146187">said</a>:</p>
<blockquote>
<p>This part of the API: <a href="https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit" target="_blank" title="https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit">https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit</a></p>
<p>looks like it might also support automation of the regression commit SHA -&gt; PR in the final report</p>
</blockquote>
<p>interesting. In practice I don't think we need this, because we only bisect down to the bors commits, which have the PR's in their commit message. (I.e. that mapping isn't happening, I think, in cargo-bisect-rustc; its just an artifact of how bors formats its merge commit messages.)</p>
</blockquote>
<p>This may be dated information, but it looks like <a href="https://github.com/rust-lang/rustc-guide/pull/556#issuecomment-574353605" target="_blank" title="https://github.com/rust-lang/rustc-guide/pull/556#issuecomment-574353605">Niko suggested this format</a> in the final Markdown report that is generated for IR threads by bisect-rustc:</p>
<div class="codehilite"><pre><span></span><span class="k">*</span> &quot;blah blah blah&quot;, PR <span class="ni">#123</span> by <span class="ni">@so</span>-and-so
</pre></div>


<p>I don't believe that we have support to dive into the commits in a rollup PR yet so we may not be ready to automate the individual PR link and PR author notification anyways.  Could we improve the final bisect-rustc report by adding the regressed commit message?  This would get us to a report that includes the SHA range tested, regression commit SHA, and the commit message.  A human still needs to be involved to review the PR's identified in the rollups but the information is all in the final bisect-rustc report pushed to the tracker.  With your recent changes to support <code>--regress</code> we should be able to automate the stderr stacktrace message reporting for the regressed commit build too?   This is much closer to a direct copy/paste report</p>



<a name="189536668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189536668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189536668">(Mar 02 2020 at 21:07)</a>:</h4>
<p>okay I posted the rebased PR: <a href="https://github.com/rust-lang/cargo-bisect-rustc/issues/63" target="_blank" title="https://github.com/rust-lang/cargo-bisect-rustc/issues/63">cargo-bisect-rustc#63</a></p>



<a name="189536804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189536804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189536804">(Mar 02 2020 at 21:08)</a>:</h4>
<p>unfortunately I have not been able to test this rebased one as thoroughly as my original version. I'm pretty sure it all works, but I kind of had to make some semi-guesses at how to handle the switch from reqwest 0.9 to reqwest 0.10</p>



<a name="189536832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/189536832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#189536832">(Mar 02 2020 at 21:08)</a>:</h4>
<p>(I <em>have</em> tested it, and I even have come up with a more general testing strategy. I'll post in that topic about that.)</p>



<a name="190281345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190281345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190281345">(Mar 11 2020 at 13:37)</a>:</h4>
<p>I came across this issue when I used the new Github API query in bisect-rustc for an ICE that fell outside of the 167 day CI commit window: <a href="https://github.com/rust-lang/cargo-bisect-rustc/issues/69" target="_blank" title="https://github.com/rust-lang/cargo-bisect-rustc/issues/69">https://github.com/rust-lang/cargo-bisect-rustc/issues/69</a></p>



<a name="190281783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190281783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190281783">(Mar 11 2020 at 13:41)</a>:</h4>
<p>IIRC, when the Rust repository is cloned the tool reports the git commit SHA's that are included in the nightly?   Thoughts about the more informative/useful approach?</p>



<a name="190290658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190290658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190290658">(Mar 11 2020 at 14:59)</a>:</h4>
<p>seems reasonable enough.</p>



<a name="190290848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190290848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190290848">(Mar 11 2020 at 15:00)</a>:</h4>
<p>the main issue I can imagine (and this may be what stopped me from doing this myself) is how to handle presentation: if you emit the SHA before the description, then that is yet more text that appears before the description, causing it to flow into the next line (or off the window if one is not line wrapping the output)</p>



<a name="190290894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190290894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190290894">(Mar 11 2020 at 15:01)</a>:</h4>
<p>but if you emit the SHA after the description, then the SHA's don't line up in the output. <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="190291327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190291327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190291327">(Mar 11 2020 at 15:04)</a>:</h4>
<p>We may be able to shorten the SHA?  I think that Github still recognizes it in issue threads when the SHA is the first ~6-7 chars?</p>



<a name="190291374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190291374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190291374">(Mar 11 2020 at 15:05)</a>:</h4>
<p>and auto links / generates hover popup of the commit IIRC</p>



<a name="190293134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190293134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190293134">(Mar 11 2020 at 15:19)</a>:</h4>
<p>okay. and we could also get rid of the current <code>commit[{}]</code> part of the output, replace that with the SHA</p>



<a name="190293198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190293198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190293198">(Mar 11 2020 at 15:19)</a>:</h4>
<p>or maybe write it as <code>{SHA}[{I}]</code> instead of <code>commit[{I}]</code></p>



<a name="190295941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190295941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190295941">(Mar 11 2020 at 15:40)</a>:</h4>
<p>checking the length of sha comment now to confirm that this actually works</p>



<a name="190296794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190296794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190296794">(Mar 11 2020 at 15:47)</a>:</h4>
<p>It looks like GH formats down to 7 characters.  When I drop to 6, it does not auto link.  When I increase to 8 it shows 7 of them. </p>
<p><a href="/user_uploads/4715/9udr4wT76VYTyK2a-GKCS51V/2020-03-11_11-46-00.png" target="_blank" title="2020-03-11_11-46-00.png">2020-03-11_11-46-00.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/9udr4wT76VYTyK2a-GKCS51V/2020-03-11_11-46-00.png" target="_blank" title="2020-03-11_11-46-00.png"><img src="/user_uploads/4715/9udr4wT76VYTyK2a-GKCS51V/2020-03-11_11-46-00.png"></a></div>



<a name="190297106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190297106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190297106">(Mar 11 2020 at 15:49)</a>:</h4>
<p>this is without the full URL string, only the initial SHA hex characters in the Markdown</p>
<p>Edit: I can also confirm that I am seeing the auto hover popup with commit message here.</p>



<a name="190297902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190297902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190297902">(Mar 11 2020 at 15:55)</a>:</h4>
<p>GitHub will autocondense long SHAs in markdown, please use at least 8 characters or so to avoid ambiguity :)</p>



<a name="190298484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use%20github%20api/near/190298484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Simpkins <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Use.20github.20api.html#190298484">(Mar 11 2020 at 15:59)</a>:</h4>
<p>Excellent point! <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>